<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center">
        <div class="webmap">
            <p class="webmaptip">当前位置:</p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">借款管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">借款申请</a>
        </div>
        <div class="querybycon">
            <form id="query">
                <div class="queryinfo">
                    <div>手机号码<input type="text" name="appMobile"></div>
                    <div>真实姓名<input type="text" name="appName"></div>
                    <div class="db">
                        申请时间 <input class="easyui-datetimebox" name="startDate">-<input class="easyui-datetimebox"
                                                                                        name="endDate">
                    </div>
                    <div>城市<input type="text" name="cityName"></div>
                    <div>状态 <input class="easyui-combobox" name="appStatus"
                                   data-options="url:'/dictionary/loanAppStatus?all=true'"></div>
                    <div class="query">
                        <a id="querybtn" href="javascript:;" class="easyui-linkbutton  "
                           data-options="iconCls:'fa fa-search'"></a>
                    </div>
                </div>
            </form>
        </div>
        <!--  <div class="querybtn">
              <a id="exportbtn" href="javascript:;" class="easyui-linkbutton  "
                 data-options="iconCls:'fa fa-search'">导出</a>
          &lt;!&ndash;<a id="add" href="javascript:;" class="easyui-linkbutton warning" data-options="iconCls:'fa fa-plus'">添加</a>
          <a id="edit" href="javascript:;" class="easyui-linkbutton danger" data-options="iconCls:'fa fa-pencil'">编辑</a>
          <a id="del" href="javascript:;" class="easyui-linkbutton success" data-options="iconCls:'fa fa-remove '">删除</a>&ndash;&gt;
      </div>-->
        <div class="separator"></div>
    </div>
    <div data-options="region:'center'" class="center">
        <table id="list"></table>
    </div>
</div>

<script type="text/javascript">
    var addUrl = "page/loan/loanAdd.html";
    var editUrl = "page/loan/loanEdit.html";
    var exportUrl = "/loan/export";
    var delUrl = '/loan/del';
    var save = '/loan/add';
    var listUrl = "/loan/list";
    var edit = "/loan/edit";

    var columns = [[
        {
            field: 'id',
            checkbox: true,
        },
        {
            field: 'appName',
            title: '姓名',
        }, {
            field: 'appMobile',
            title: '手机号',
        }, {
            field: 'appAmount',
            title: '申请金额（万元）',
            align: 'right',
            formatter: function (value, row, index) {
                if (value) {
                    return value.formatMoney();
                }
                return value;
            }

        }, {
            field: 'cityName',
            title: '城市',
        }, {
            field: 'appSource',
            title: '来源',
            formatter: function (value, row, index) {
                return dic["chanel"][value.toString()];
            }
        }, {
            field: 'createdDate',
            title: '申请时间',
        }, {
            field: 'appStatus',
            title: '状态',
            formatter: function (value, row, index) {
                return dic["loanAppStatus"][value.toString()];
            }
        }]];
    list.init({url: listUrl, columns: columns});

    $("#exportbtn").click(function () {
        var obj = $("#query").serializeObject();
        window.open(exportUrl + "?" + $(obj).formatJson2Url());
    });

</script>